package com.abc.mapper;

import com.abc.entity.Yuanxi;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface YuanxiMapper {

    //新增院系
    @Insert("insert into yuanxi(mingcheng) values(#{mingcheng})")
    int insertYuanxi(Yuanxi yuanxi);
    //根据 mingcheng 查询单条记录
    @Select("select * from yuanxi where mingcheng=#{mingcheng}")
    Yuanxi findByYuanxiMingcheng(String mingcheng);
    //查询所有的记录
    @Select("select * from yuanxi")
    List<Yuanxi> findAllYuanxi();

}
